<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditLancamentosTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditLancamentosLabel_idLancamento}" for="idLancamento" />
                    <h:inputText id="idLancamento" value="#{lancamentosController.selected.idLancamento}" title="#{bundle.EditLancamentosTitle_idLancamento}" required="true" requiredMessage="#{bundle.EditLancamentosRequiredMessage_idLancamento}"/>
                    <h:outputLabel value="#{bundle.EditLancamentosLabel_historico}" for="historico" />
                    <h:inputText id="historico" value="#{lancamentosController.selected.historico}" title="#{bundle.EditLancamentosTitle_historico}" required="true" requiredMessage="#{bundle.EditLancamentosRequiredMessage_historico}"/>
                    <h:outputLabel value="#{bundle.EditLancamentosLabel_valor}" for="valor" />
                    <h:inputText id="valor" value="#{lancamentosController.selected.valor}" title="#{bundle.EditLancamentosTitle_valor}" required="true" requiredMessage="#{bundle.EditLancamentosRequiredMessage_valor}"/>
                    <h:outputLabel value="#{bundle.EditLancamentosLabel_tipoLancamento}" for="tipoLancamento" />
                    <h:inputText id="tipoLancamento" value="#{lancamentosController.selected.tipoLancamento}" title="#{bundle.EditLancamentosTitle_tipoLancamento}" required="true" requiredMessage="#{bundle.EditLancamentosRequiredMessage_tipoLancamento}"/>
                    <h:outputLabel value="#{bundle.EditLancamentosLabel_tipoPagamento}" for="tipoPagamento" />
                    <h:inputText id="tipoPagamento" value="#{lancamentosController.selected.tipoPagamento}" title="#{bundle.EditLancamentosTitle_tipoPagamento}" required="true" requiredMessage="#{bundle.EditLancamentosRequiredMessage_tipoPagamento}"/>
                    <h:outputLabel value="#{bundle.EditLancamentosLabel_fkUsuario}" for="fkUsuario" />
                    <h:selectOneMenu id="fkUsuario" value="#{lancamentosController.selected.fkUsuario}" title="#{bundle.EditLancamentosTitle_fkUsuario}" required="true" requiredMessage="#{bundle.EditLancamentosRequiredMessage_fkUsuario}">
                        <f:selectItems value="#{usuarioController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditLancamentosLabel_fkContaDebitar}" for="fkContaDebitar" />
                    <h:selectOneMenu id="fkContaDebitar" value="#{lancamentosController.selected.fkContaDebitar}" title="#{bundle.EditLancamentosTitle_fkContaDebitar}" required="true" requiredMessage="#{bundle.EditLancamentosRequiredMessage_fkContaDebitar}">
                        <f:selectItems value="#{contasController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditLancamentosLabel_fkContaCreditar}" for="fkContaCreditar" />
                    <h:selectOneMenu id="fkContaCreditar" value="#{lancamentosController.selected.fkContaCreditar}" title="#{bundle.EditLancamentosTitle_fkContaCreditar}" required="true" requiredMessage="#{bundle.EditLancamentosRequiredMessage_fkContaCreditar}">
                        <f:selectItems value="#{contasController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditLancamentosLabel_data}" for="data" />
                    <h:inputText id="data" value="#{lancamentosController.selected.data}" title="#{bundle.EditLancamentosTitle_data}" required="true" requiredMessage="#{bundle.EditLancamentosRequiredMessage_data}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                </h:panelGrid>
                <h:commandLink action="#{lancamentosController.update}" value="#{bundle.EditLancamentosSaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditLancamentosViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{lancamentosController.prepareList}" value="#{bundle.EditLancamentosShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditLancamentosIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
